﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>engage_resumeSpUpdate</title>
    <script src="~/lib/axios/dist/axios.js"></script>
    <script src="~/lib/vue/dist/vue.js"></script>
    <script src="~/lib/element-ui/lib/index.js"></script>
    <link href="~/lib/element-ui/lib/theme-chalk/index.css" rel="stylesheet" />
</head>
<body>
    <div id="app">
        <el-card class="box-card">
            <el-form ref="form" :model="form" :rules="rules" label-width="100px" :inline="true" size="mini">
                <el-form-item label="职位名称" prop="vaue">
                    <div class="block">
                        <el-cascader v-model="chans.vaue"
                                     :options="chans.list"
                                     style="width: 100px "
                                     :disabled="true"
                                     @@change="adminSelect1"></el-cascader>
                    </div>
                </el-form-item>
                <el-form-item label="招聘类型" prop="engage_type">
                    <el-select v-model="form.engage_type" placeholder="请选择招聘类型" style="width: 100px " :disabled="true">
                        <el-option label="校园招聘" value="校园招聘"></el-option>
                        <el-option label="社会招聘" value="社会招聘"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="姓名" prop="human_name">
                    <el-input v-model="form.human_name" style="width: 100px " :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="性别" prop="human_sex">
                    <el-select v-model="form.human_sex" placeholder="请选择性别" style="width: 100px " :disabled="true">
                        <el-option label="男" value="男"></el-option>
                        <el-option label="女" value="女"></el-option>
                    </el-select>
                </el-form-item>
                <div class="kbl">
                    <el-form-item>
                        <el-upload class="upload-demo"
                                   action="''"
                                   :file-list="fileList"
                                   list-type="picture-card"
                                   :limit="1"
                                   :auto-upload="false"
                                   :disabled="true">
                            <i slot="default" class="el-icon-plus"></i>
                        </el-upload>
                    </el-form-item>
                </div>
                <el-form-item label="EMAIL" prop="human_email">
                    <el-input v-model="form.human_email" style="width: 100px " :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="电话" prop="human_telephone">
                    <el-input v-model="form.human_telephone" style="width: 100px " :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="家庭电话" prop="human_homephone">
                    <el-input v-model="form.human_homephone" style="width: 100px " :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="手机" prop="human_mobilephone">
                    <el-input v-model="form.human_mobilephone" style="width: 100px " :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="住址" prop="human_address">
                    <el-input v-model="form.human_address" style="width: 100px " :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="邮编" prop="human_postcode">
                    <el-input v-model="form.human_postcode" style="width: 100px " :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="国籍" prop="human_nationality">
                    <template>
                        <el-select v-model="form.human_nationality" placeholder="请选择国籍" style="width: 100px " :disabled="true">
                            <el-option v-for="item in chans.list1"
                                       :key="item.pbc_id"
                                       :label="item.attribute_name"
                                       :value="item.attribute_name">
                            </el-option>
                        </el-select>
                    </template>
                </el-form-item>
                <el-form-item label="出生地" prop="human_birthplace">
                    <el-date-picker style="width: 100px " type="date" v-model="form.human_birthday" :disabled="true"></el-date-picker>
                </el-form-item>
                <el-form-item label="生日" prop="human_birthday">
                    <el-input v-model="form.human_birthday" style="width: 100px " :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="民族" prop="human_race">
                    <template>
                        <el-select v-model="form.human_race" placeholder="请选择民族" style="width: 100px " :disabled="true">
                            <el-option v-for="item in chans.list2"
                                       :key="item.pbc_id"
                                       :label="item.attribute_name"
                                       :value="item.attribute_name">
                            </el-option>
                        </el-select>
                    </template>
                </el-form-item>
                <el-form-item label="宗教信仰" prop="human_religion">
                    <template>
                        <el-select v-model="form.human_religion" placeholder="请选择宗教信仰" style="width: 100px " :disabled="true">
                            <el-option v-for="item in chans.list3"
                                       :key="item.pbc_id"
                                       :label="item.attribute_name"
                                       :value="item.attribute_name">
                            </el-option>
                        </el-select>
                    </template>
                </el-form-item>
                <el-form-item label="政治面貌" prop="human_party">
                    <template>
                        <el-select v-model="form.human_party" placeholder="请选择政治面貌" style="width: 100px " :disabled="true">
                            <el-option v-for="item in chans.list4"
                                       :key="item.pbc_id"
                                       :label="item.attribute_name"
                                       :value="item.attribute_name">
                            </el-option>
                        </el-select>
                    </template>
                </el-form-item>
                <el-form-item label="身份证号" prop="human_idcard">
                    <el-input v-model="form.human_idcard" style="width: 100px " :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="年龄" prop="human_age">
                    <el-input v-model="form.human_age" style="width: 100px " :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="毕业院校" prop="human_college">
                    <el-input v-model="form.human_college" style="width: 100px " :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="学历" prop="human_educated_degree">
                    <template>
                        <el-select v-model="form.human_educated_degree" placeholder="请选择学历" style="width: 100px " :disabled="true">
                            <el-option v-for="item in chans.list6"
                                       :key="item.pbc_id"
                                       :label="item.attribute_name"
                                       :value="item.attribute_name">
                            </el-option>
                        </el-select>
                    </template>
                </el-form-item>
                <el-form-item label="教育年限" prop="human_educated_years">
                    <template>
                        <el-select v-model="form.human_educated_years" placeholder="请选择教育年限" style="width: 100px " :disabled="true">
                            <el-option v-for="item in chans.list5"
                                       :key="item.pbc_id"
                                       :label="item.attribute_name"
                                       :value="item.attribute_name">
                            </el-option>
                        </el-select>
                    </template>
                </el-form-item>
                <el-form-item label="学历专业" prop="human_educated_major">
                    <template>
                        <el-select v-model="form.human_educated_major" placeholder="请选择学历专业" style="width: 100px " :disabled="true">
                            <el-option v-for="item in chans.list7"
                                       :key="item.pbc_id"
                                       :label="item.attribute_name"
                                       :value="item.attribute_name">
                            </el-option>
                        </el-select>
                    </template>
                </el-form-item>
                <el-form-item label="薪酬要求" prop="demand_salary_standard">
                    <el-input v-model="form.demand_salary_standard" style="width: 100px " :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="特长" prop="human_specility">
                    <template>
                        <el-select v-model="form.human_specility" placeholder="请选择特长" style="width: 100px " :disabled="true">
                            <el-option v-for="item in chans.list8"
                                       :key="item.pbc_id"
                                       :label="item.attribute_name"
                                       :value="item.attribute_name">
                            </el-option>
                        </el-select>
                    </template>
                </el-form-item>
                <el-form-item label="爱好" prop="human_hobby">
                    <template>
                        <el-select v-model="form.human_hobby" placeholder="请选择爱好" style="width: 100px " :disabled="true">
                            <el-option v-for="item in chans.list9"
                                       :key="item.pbc_id"
                                       :label="item.attribute_name"
                                       :value="item.attribute_name">
                            </el-option>
                        </el-select>
                    </template>
                </el-form-item>
                <el-form-item prop="regist_time" label="注册时间">
                    <el-date-picker style="width: 100px " :disabled="true" type="date" placeholder="选择日期" v-model="form.regist_time"></el-date-picker>
                </el-form-item>
                <el-form-item label="推荐人" prop="checker">
                    <el-input v-model="form.checker" style="width: 100px " :disabled="true"></el-input>
                </el-form-item>
                <el-form-item prop="check_time" label="推荐时间">
                    <el-date-picker style="width: 100px " :disabled="true" type="date" placeholder="选择日期" v-model="form.check_time"></el-date-picker>
                </el-form-item>
                <el-form-item label="档案附件" prop="attachment_name">
                    <el-input v-model="form.attachment_name" style="width: 464px " :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="个人履历" prop="human_history_records" autosize>
                    <el-input type="textarea" v-model="form.human_history_records" style="width: 1108px " :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="备注" prop="remark">
                    <el-input type="textarea" v-model="form.remark" style="width: 1108px " autosize :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="筛选推荐意见" prop="recomandation">
                    <el-input type="textarea" v-model="form.recomandation" style="width: 1108px " autosize :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="面试次数" prop="interview_amount">
                    <el-input v-model="form.interview_amount" style="width: 100px " :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="形象评价" prop="image_degree">
                    <el-select v-model="form.image_degree" placeholder="请选择评级" style="width: 100px " :disabled="true">
                        <el-option label="A" value="A"></el-option>
                        <el-option label="B" value="B"></el-option>
                        <el-option label="C" value="C"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="口才评价" prop="native_language_degree">
                    <el-select v-model="form.native_language_degree" placeholder="请选择评级" style="width: 100px " :disabled="true">
                        <el-option label="A" value="A"></el-option>
                        <el-option label="B" value="B"></el-option>
                        <el-option label="C" value="C"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="外语口语能力" prop="foreign_language_degree">
                    <el-select v-model="form.foreign_language_degree" placeholder="请选择评级" style="width: 100px " :disabled="true">
                        <el-option label="A" value="A"></el-option>
                        <el-option label="B" value="B"></el-option>
                        <el-option label="C" value="C"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="应变能力" prop="response_speed_degree">
                    <el-select v-model="form.response_speed_degree" placeholder="请选择评级" style="width: 100px " :disabled="true">
                        <el-option label="A" value="A"></el-option>
                        <el-option label="B" value="B"></el-option>
                        <el-option label="C" value="C"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="EQ" prop="EQ_degree">
                    <el-select v-model="form.EQ_degree" placeholder="请选择评级" style="width: 100px " :disabled="true">
                        <el-option label="A" value="A"></el-option>
                        <el-option label="B" value="B"></el-option>
                        <el-option label="C" value="C"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="IQ" prop="IQ_degree">
                    <el-select v-model="form.IQ_degree" placeholder="请选择评级" style="width: 100px " :disabled="true">
                        <el-option label="A" value="A"></el-option>
                        <el-option label="B" value="B"></el-option>
                        <el-option label="C" value="C"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="综合素质" prop="multi_quality_degree">
                    <el-select v-model="form.multi_quality_degree" placeholder="请选择评级" style="width: 100px " :disabled="true">
                        <el-option label="A" value="A"></el-option>
                        <el-option label="B" value="B"></el-option>
                        <el-option label="C" value="C"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="面试人" prop="register">
                    <el-input v-model="form.register" style="width: 100px " :disabled="true"></el-input>
                </el-form-item>
                <el-form-item prop="registe_time" label="面试时间">
                    <el-date-picker style="width: 125px " :disabled="true" type="date" placeholder="选择日期" v-model="form.registe_time"></el-date-picker>
                </el-form-item>
                <el-form-item label="筛选人" prop="checker">
                    <el-input v-model="form.checker" style="width: 100px " :disabled="true"></el-input>
                </el-form-item>
                <el-form-item prop="check_time" label="筛选时间">
                    <el-date-picker style="width: 125px " :disabled="true" type="date" placeholder="选择日期" v-model="form.check_time"></el-date-picker>
                </el-form-item>
                <el-form-item label="录用申请审核意见" prop="pass_checkComment" label-width="135px">
                    <el-select v-model="form.pass_checkComment" placeholder="请选择操作" style="width: 100px " :disabled="true">
                        <el-option label="通过" value="通过"></el-option>
                        <el-option label="不通过" value="不通过"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="录用申请审批审核意见" prop="pass_passComment" label-width="163px">
                    <el-select v-model="form.pass_passComment" placeholder="请选择操作" style="width: 100px ">
                        <el-option label="通过" value="通过"></el-option>
                        <el-option label="不通过" value="不通过"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item class="_klpo">
                    <template>
                        <el-button type="primary" @@click="submitForm('form')">确认</el-button>
                    </template>
                    <el-button @@click="resetForm()">返回</el-button>
                </el-form-item>
            </el-form>
            </el-card>
    </div>
    <script type="text/javascript">
        var vm = new Vue({
            el: "#app",
            data: {
                fileList: [],//图片
                chans: {
                    vaue: [],//职位
                    list: [],//职位
                    list1: [],//国籍
                    list2: [],//民族
                    list3: [],//宗教信仰
                    list4: [],//政治面貌
                    list5: [],//教育年限
                    list6: [],//学历
                    list7: [],//专业
                    list8: [],//特长
                    list9: [],//爱好
                },
                form: {
                    human_major_kind_id: '',
                    human_major_kind_name: '',
                    human_major_id: '',
                    human_major_name: '',
                    engage_type: '',
                    human_name: '',
                    human_sex: '',
                    human_email: '',
                    human_telephone: '',
                    human_address: '',
                    human_postcode: '',
                    human_nationality: '',
                    human_birthplace: '',
                    human_birthday: '',
                    human_race: '',
                    human_religion: '',
                    human_party: '',
                    human_idcard: '',
                    human_age: '',
                    human_college: '',
                    human_educated_degree: '',
                    human_educated_years: '',
                    human_educated_major: '',
                    demand_salary_standard: '',
                    regist_time: '',
                    human_specility: '',
                    human_hobby: '',
                    human_history_records: '',
                    remark: '',
                    human_picture: [],
                    recomandation: '',
                    res_id: '',
                    checker: '',
                    check_time: '',
                    attachment_name: '',
                    test_amount: '',
                    pass_checkComment: '',
                    test_check_time: '',
                    pass_passComment:'',
                    //面试登记
                    interview_status:'',
                    interview_amount: '',
                    image_degree: '',
                    native_language_degree: '',
                    foreign_language_degree: '',
                    response_speed_degree: '',
                    EQ_degree: '',
                    IQ_degree: '',
                    multi_quality_degree: '',
                    register: '',
                    registe_time: '',
                    interview_comment: '',
                    check_comment: '',
                    ein_id: '',
                    resume_id: '',
                    check_status: '',
                },
                rules: {
                    pass_passComment: [
                        { required: true, message: '请选择操作', trigger: 'change' }
                    ],
                }
            },
            methods: {
                resetForm() {
                    location.href = "/engage_resumeSp/engage_resumeSp";
                },
                submitForm(formName) {
                    //表单验证
                    this.$refs[formName].validate((valid) => {
                        if (valid) {
                                this.$confirm('确定此次操作吗?', '提示', {
                                    confirmButtonText: '确定',
                                    cancelButtonText: '取消',
                                    type: 'warning'
                                }).then(() => {
                                    this.update();
                                }).catch(() => {
                                    this.$message({
                                        type: 'info',
                                        message: '已取消操作'
                                    });
                                });
                        } else {
                            this.$message({
                                type: 'error',
                                message: '请填写完整信息!'
                            });
                            return false;
                        }
                    });
                },
                 //简历登记表录用修改
                update() {
                    if (this.form.pass_passComment == "通过") {
                        this.upout();
                    } else if (this.form.pass_passComment == "不通过") {
                        this.$confirm('确定删除简历吗?', '提示', {
                            confirmButtonText: '确定',
                            cancelButtonText: '取消',
                            type: 'warning'
                        }).then(() => {
                            this.del();
                        }).catch(() => {
                            this.$message({
                                type: 'info',
                                message: '已取消删除'
                            });
                        });
                    }
                },
                del() {
                      //简历登记表录用删除
                    axios.get('/engage_interviewTo/Delt', {
                        params: {
                            id: this.form.ein_id,
                        }
                    })
                        .then(res => {
                            console.info(res);
                             //简历登记删除
                            axios.get('/engage_interviewTo/DeltTo', {
                                params: {
                                    id: this.form.res_id,
                                }
                            })
                                .then(res => {
                                    console.info(res);
                                    this.$message({
                                        type: 'success',
                                        message: '删除成功!'
                                    });
                                    this.resetForm();
                                })
                                .catch(err => {
                                    console.info(err);
                                })
                        })
                        .catch(err => {
                            console.info(err);
                        })
                },
                 //简历登记录用审批审核意见修改
                upout() {
                    axios.get('/engage_resumeSp/Shysp', {
                        params: {
                            res_id: this.form.res_id,
                            pass_passComment: this.form.pass_passComment,
                        }
                    })
                        .then(res => {
                            console.info(res);
                            this.$message({
                                type: 'success',
                                message: '操作成功!'
                            });
                            this.resetForm();
                        })
                        .catch(err => {
                            console.info(err);
                        })
                    axios.get('/WenJian/SendEmailMimeKit', {
                        params: {
                            name: this.form.human_name,
                            email: this.form.human_email,
                        }
                    })
                        .then(res => {
                            console.info(res);
                        })
                        .catch(err => {
                            console.info(err);
                        });
                },
                fill() {
                    //职位查询
                    axios.get('/engage_major_release/Dgto', {
                    })
                        .then(res => {
                            console.info(res);
                            this.chans.list = res.data;
                        })
                        .catch(err => {
                            console.info(err);
                        });
                    //简历表回显
                    axios.get('/engage_resumeUpdate/Jlcx/' + @ViewBag.res_id)
                        .then(res => {
                            var ruest = [];
                            ruest.push(res.data.human_major_kind_id);
                            ruest.push(res.data.human_major_id);
                            this.chans.vaue = ruest;
                            this.form.human_major_kind_id = res.data.human_major_kind_id;
                            this.form.human_major_id = res.data.human_major_id;
                            this.form.human_major_kind_name = res.data.human_major_kind_name;
                            this.form.human_major_name = res.data.human_major_name;
                            this.form.engage_type = res.data.engage_type;
                            this.form.human_name = res.data.human_name;
                            this.form.human_sex = res.data.human_sex;
                            this.form.human_email = res.data.human_email;
                            this.form.human_telephone = res.data.human_telephone;
                            this.form.human_homephone = res.data.human_homephone;
                            this.form.human_mobilephone = res.data.human_mobilephone;
                            this.form.human_address = res.data.human_address;
                            this.form.human_postcode = res.data.human_postcode;
                            this.form.human_nationality = res.data.human_nationality;
                            this.form.human_birthplace = res.data.human_birthplace;
                            this.form.human_birthday = res.data.human_birthday;
                            this.form.human_race = res.data.human_race;
                            this.form.human_religion = res.data.human_religion;
                            this.form.human_party = res.data.human_party;
                            this.form.human_idcard = res.data.human_idcard;
                            this.form.human_age = res.data.human_age;
                            this.form.human_college = res.data.human_college;
                            this.form.human_educated_degree = res.data.human_educated_degree;
                            this.form.human_educated_years = res.data.human_educated_years;
                            this.form.human_educated_major = res.data.human_educated_major;
                            this.form.demand_salary_standard = res.data.demand_salary_standard;
                            this.form.regist_time = res.data.regist_time;
                            this.form.human_specility = res.data.human_specility;
                            this.form.human_hobby = res.data.human_hobby;
                            this.form.human_history_records = res.data.human_history_records;
                            this.form.remark = res.data.remark;
                            this.form.res_id = res.data.res_id;
                            this.form.recomandation = res.data.recomandation;
                            this.form.checker = res.data.checker;
                            this.form.check_time = res.data.check_time;
                            this.form.attachment_name = res.data.attachment_name;
                            this.form.test_amount = res.data.test_amount;
                            this.form.pass_checkComment = res.data.pass_checkComment;
                            var obj = {};
                            obj.url = res.data.human_picture;
                            this.fileList.push(obj);
                            axios.get('/engage_resumeSq/JlcxTo/', {
                                params: {
                                    id: res.data.res_id
                                }
                            })
                        .then(res => {
                            this.form.interview_amount = res.data[0].interview_amount;
                            this.form.image_degree = res.data[0].image_degree;
                            this.form.native_language_degree = res.data[0].native_language_degree;
                            this.form.foreign_language_degree = res.data[0].foreign_language_degree;
                            this.form.response_speed_degree = res.data[0].response_speed_degree;
                            this.form.EQ_degree = res.data[0].EQ_degree;
                            this.form.IQ_degree = res.data[0].IQ_degree;
                            this.form.multi_quality_degree = res.data[0].multi_quality_degree;
                            this.form.register = res.data[0].register;
                            this.form.registe_time = res.data[0].registe_time;
                            this.form.interview_comment = res.data[0].interview_comment;
                            this.form.checker = '陆伟';
                            this.form.ein_id = res.data[0].ein_id;
                        })
                        .catch(err => {
                            console.info(err);
                        });
                        })
                        .catch(err => {
                            console.info(err);
                        });
                }
            },
            //可以对vue的数据和方法进行操作,不能对DOM进行操作
            created: function () {
                this.fill();
            }
        });
    </script>
    <style>
        .hide .el-upload--picture-card {
            display: none;
        }

        .kbl {
            width: 148px;
            height: 148px;
            overflow: hidden;
            float: right;
        }

        ._klpo {
            float: right;
        }
        .el-card__body {
            padding: 7px;
        }

        .el-form-item--mini.el-form-item, .el-form-item--small.el-form-item {
            margin-bottom: 20px;
        }
    </style>
</body>
</html>
